<div id="main-visual">
  <img src="/images/shoppingcart.jpg" alt=""  />
</div>
 <% if flash[:notice] %>
      <span style="color:red"><%= flash[:notice]%></span>
    <% end %>
<div id="cart_table">
  <% form_for @cart,:url=>cart_path,:html => {:method=>:put,:id=>'cart_form'} do |f| %>
    <table >
      <tr id="head">
        <th id="picture">商品画像</th>
        <th id="name">商品名称</th>
        <th id="price">贩卖金额</th>
        <th id="amount">数量</th>
        <th id="input">变更</th>
        <th id="subtotal">小计</th>
      </tr>
      <% for item in @cart.items %>
        <tr>
          <td><%= link_to image_tag(item.product.first_list_image,:size=>"80x80"),product_path(item.product)%></td>
          <td><%= link_to item.product.name,product_path(item.product) %> <br/><strong></strong></td>
          <td><%=item.product.price %></td>
          <td><%= text_field_tag "items[#{item.id}]", item.quantity, :size => 2, :maxlength => 2 %><br/><input type="button" value="改变" onclick="$('cart_form').submit();"/></td>
          <td><%= link_to "削除",item ,:method => :delete,:confirm => "are you sure to delete?" %> </td>
          <td><%=  %></td>
        </tr>
      <% end %>
      <tr style="line-height:8px;">
        <td id="total" colspan="5">合计金额</td>
        <td><%= @cart.subtotal%></td>
      <tr/>
    </table>
   
  <%#*<input type="image" src="/images/button_change.gif" onclick="$('cart_form').submit();"/>%>
  <% end %>
  <div id="cart_page1"><%=  %></div>
  <div id="cart_page2"><%= %></div>
</div>
